<?php

namespace App\Http\Controllers\test;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class TestObj extends Controller
{
    //

    private $_testProperties = "一个私有属性";

    public $property = "公有属性";


    private function __destruct()
    {
        // TODO: Implement __destruct() method.
        echo "调用了一次析构函数",'<hr />';
    }

    public function __invoke()
    {
        // TODO: Implement __invoke() method.
        $obj01 = new TestObj();

        $obj02 = $obj01;

        $obj03 =clone $obj01;

        $obj02->property = "good";
        echo $obj02->property;

        var_dump($obj01);
        echo '<hr />';

        var_dump($obj02);
        echo '<hr />';

        var_dump($obj03);
        echo '<hr />';



        echo "good";

    }
}
